%% Part of Computer Shop Demo
%%  
-include_lib("ect/include/ect.hrl").

-class(printer).
-superclass(device).
-import_class(device).
?FIELDS(1, public, {toner_price}).
-methods([print/1]).
-export([dotest/0]).

print(This = #printer{toner_price = TonerPrice}) ->
    io:format("PRINTER:~n", []),
    {{This}}:print(),
    io:format("Toner Price= ~p~n", [TonerPrice]).

dotest() ->
    {#printer{}}:dotest().